

import Dict from "./Dict"
import { PaginationTable } from "@xuekl/cli-core/builder"
import { Selection, Index, Operation } from "@xuekl/cli-core/helper"
import { TableSelection, TableIndex, TableColumn, TableOperation } from "@xuekl/cli-core/types"


export default class DictTable extends PaginationTable<Dict> implements Selection<Dict>, Index, Operation {
    operation: TableOperation = {
        label: '操作',
        width: 100
    }
    index: TableIndex = {
        width: 60,
        label: '序号'
    }
    selection: TableSelection = {}
    selectedData: Dict[] = []
    columns: TableColumn<Dict>[] = [
        {
            prop: 'dictName',
            label: '字典名称'
        },
        {
            prop: 'dictType',
            label: '字典类型'
        },
        {
            prop: 'status',
            label: '状态',
            dict: 'sys_normal_disable',
            tags: [{ value: '0', type: 'primary' }, { value: '1', type: 'danger' }]
        },
        {
            prop: 'remark',
            label: '备注'
        },
    ]
}